import { StreamLanguage } from '@codemirror/language';
import { go } from '@codemirror/legacy-modes/mode/go';
import CodeMirror from '@uiw/react-codemirror';

export default ({ value, onChange }) => {
  return (
    <CodeMirror
      value={value}
      onChange={onChange}
      height="400px"
      extensions={[StreamLanguage.define(go)]}
    />
  );
};
